//
//  ByTitleImageView.m
//  recordworktool_ios
//
//  Created by mc on 2017/11/30.
//  Copyright © 2017年 ZhangZhanbin. All rights reserved.
//

#import "ByTitleImageView.h"

@implementation ByTitleImageView

- (id)init{
    self = [super init];
    if (self){
        self.backgroundColor = [UIColor whiteColor];
        
        self.imageView = [[UIImageView alloc] init];
        [self addSubview:self.imageView];
        [self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.equalTo(self).offset(0);
            make.centerY.equalTo(self).offset(-15);
            make.size.mas_equalTo(CGSizeMake(40, 40));
        }];

        self.imageView.userInteractionEnabled = YES;
    
    
    self.titleLabel = [[UILabel alloc] init];
    [self addSubview:self.titleLabel];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self).offset(10);
        make.right.equalTo(self).offset(-10);
        make.top.equalTo(self.imageView.mas_bottom).offset(10);
        make.height.mas_equalTo(@20);
    }];
    self.titleLabel.text = @"记工清单";
    self.titleLabel.textColor = TEXT_COLOR;
    self.titleLabel.font = FONT(16);
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    
    }
    return self;
}

@end
